<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>emp-toolkit: /Users/wangxiao/git/emp-toolkit/emp-tool/garble/garble.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-full-doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">emp-toolkit
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('garble_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">garble.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="garble_2block_8h_source.html">block.h</a>&quot;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;openssl/sha.h&gt;</code><br />
</div>
<p><a href="garble_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgarble__gate.html">garble_gate</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgarble__fixed__wire.html">garble_fixed_wire</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgarble__circuit.html">garble_circuit</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a4860dfda91f16ccd0cbf45481aba46fc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a4860dfda91f16ccd0cbf45481aba46fc">GARBLE_OK</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a4860dfda91f16ccd0cbf45481aba46fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31a53c5ee0f66ce6b74ac1a171d35625"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a31a53c5ee0f66ce6b74ac1a171d35625">GARBLE_ERR</a>&#160;&#160;&#160;-1</td></tr>
<tr class="separator:a31a53c5ee0f66ce6b74ac1a171d35625"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:af39b2d4a5065ed9a3eed74fc34ac2ad4"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a> { <a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087">GARBLE_TYPE_STANDARD</a>, 
<a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355">GARBLE_TYPE_HALFGATES</a>, 
<a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233">GARBLE_TYPE_PRIVACY_FREE</a>
 }</td></tr>
<tr class="separator:af39b2d4a5065ed9a3eed74fc34ac2ad4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acde351ee0c4a231557cb9d0b8b7a2641"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a> { <br />
&#160;&#160;<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336">GARBLE_GATE_ZERO</a> = 0, 
<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26">GARBLE_GATE_ONE</a> = 15, 
<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa">GARBLE_GATE_AND</a> = 8, 
<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff">GARBLE_GATE_OR</a> = 14, 
<br />
&#160;&#160;<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc">GARBLE_GATE_XOR</a> = 6, 
<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9">GARBLE_GATE_NOT</a> = 5, 
<a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6">GARBLE_GATE_EMPTY</a> = -1
<br />
 }</td></tr>
<tr class="separator:acde351ee0c4a231557cb9d0b8b7a2641"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7697bea1e9186be63eee52a56b77e105"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">garble_fixed_wire_e</a> { <a class="el" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f">GARBLE_FIXED_WIRE_ZERO</a> = 0, 
<a class="el" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26">GARBLE_FIXED_WIRE_ONE</a> = 1
 }</td></tr>
<tr class="separator:a7697bea1e9186be63eee52a56b77e105"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a20bfa75f4c119870870505e56a94570d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a20bfa75f4c119870870505e56a94570d">garble_table_size</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc)</td></tr>
<tr class="separator:a20bfa75f4c119870870505e56a94570d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d737f9363be1158045f0ed69c559e6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a89d737f9363be1158045f0ed69c559e6">garble_new</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, uint64_t n, uint64_t m, <a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a> type)</td></tr>
<tr class="separator:a89d737f9363be1158045f0ed69c559e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c1b1fd633c98c372c0e1b20c591734e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a6c1b1fd633c98c372c0e1b20c591734e">garble_delete</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc)</td></tr>
<tr class="separator:a6c1b1fd633c98c372c0e1b20c591734e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ec524e6b001e5aac0add6e919ed79f3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a7ec524e6b001e5aac0add6e919ed79f3">garble_garble</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *input_labels, <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels)</td></tr>
<tr class="separator:a7ec524e6b001e5aac0add6e919ed79f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ec77b23347e8f4a4711314af040e6a4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a8ec77b23347e8f4a4711314af040e6a4">garble_hash</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, unsigned char hash[SHA_DIGEST_LENGTH])</td></tr>
<tr class="separator:a8ec77b23347e8f4a4711314af040e6a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af34b0a90e6270876e81746bcea49b1c3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#af34b0a90e6270876e81746bcea49b1c3">garble_check</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, const unsigned char hash[SHA_DIGEST_LENGTH])</td></tr>
<tr class="separator:af34b0a90e6270876e81746bcea49b1c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a897f0ca0e18a20f471a0f5e7a8337a9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a897f0ca0e18a20f471a0f5e7a8337a9f">garble_create_delta</a> (void)</td></tr>
<tr class="separator:a897f0ca0e18a20f471a0f5e7a8337a9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64fd0f10ec2840d1330c2e47224919a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a64fd0f10ec2840d1330c2e47224919a8">garble_create_input_labels</a> (<a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *labels, uint64_t n, <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *delta, bool privacyfree)</td></tr>
<tr class="separator:a64fd0f10ec2840d1330c2e47224919a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aa790863d24f73f7502ef7a7dc05be1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a7aa790863d24f73f7502ef7a7dc05be1">garble_eval</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *input_labels, <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels, bool *outputs)</td></tr>
<tr class="separator:a7aa790863d24f73f7502ef7a7dc05be1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa461a818a34411380a3e1028bd4203e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#aa461a818a34411380a3e1028bd4203e5">garble_extract_labels</a> (<a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *extracted_labels, const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *labels, const bool *bits, uint64_t n)</td></tr>
<tr class="separator:aa461a818a34411380a3e1028bd4203e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9f7f736a766cb8ad0e880feeef6d20"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a4b9f7f736a766cb8ad0e880feeef6d20">garble_map_outputs</a> (const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *output_labels, const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *map, bool *vals, uint64_t m)</td></tr>
<tr class="separator:a4b9f7f736a766cb8ad0e880feeef6d20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae26c7329a5f399ac41789738554d120e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#ae26c7329a5f399ac41789738554d120e">garble_circuit_to_file</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, char *fname)</td></tr>
<tr class="separator:ae26c7329a5f399ac41789738554d120e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49e02f7f9707443a340667d6b31f3551"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a49e02f7f9707443a340667d6b31f3551">garble_circuit_from_file</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, char *fname)</td></tr>
<tr class="separator:a49e02f7f9707443a340667d6b31f3551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27c3063abd801e159764f1fac8e33a77"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a27c3063abd801e159764f1fac8e33a77">garble_size</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, bool wires)</td></tr>
<tr class="separator:a27c3063abd801e159764f1fac8e33a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922d374cc71891c04534bca09b6e87cf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a922d374cc71891c04534bca09b6e87cf">garble_save</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, FILE *f, bool wires)</td></tr>
<tr class="separator:a922d374cc71891c04534bca09b6e87cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93d0d290d611e7113a452663f46e80dc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a93d0d290d611e7113a452663f46e80dc">garble_load</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, FILE *f, bool wires)</td></tr>
<tr class="separator:a93d0d290d611e7113a452663f46e80dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e352fd4b3bba37650eba0c84b38df15"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a1e352fd4b3bba37650eba0c84b38df15">garble_to_buffer</a> (const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, char *buf, bool wires)</td></tr>
<tr class="separator:a1e352fd4b3bba37650eba0c84b38df15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f1bd70b4528fef9e8ed516521bed8be"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="garble_8h.html#a4f1bd70b4528fef9e8ed516521bed8be">garble_from_buffer</a> (<a class="el" href="structgarble__circuit.html">garble_circuit</a> *gc, const char *buf, bool wires)</td></tr>
<tr class="separator:a4f1bd70b4528fef9e8ed516521bed8be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a31a53c5ee0f66ce6b74ac1a171d35625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31a53c5ee0f66ce6b74ac1a171d35625">&sect;&nbsp;</a></span>GARBLE_ERR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GARBLE_ERR&#160;&#160;&#160;-1</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4860dfda91f16ccd0cbf45481aba46fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4860dfda91f16ccd0cbf45481aba46fc">&sect;&nbsp;</a></span>GARBLE_OK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GARBLE_OK&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a7697bea1e9186be63eee52a56b77e105"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7697bea1e9186be63eee52a56b77e105">&sect;&nbsp;</a></span>garble_fixed_wire_e</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="garble_8h.html#a7697bea1e9186be63eee52a56b77e105">garble_fixed_wire_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a7697bea1e9186be63eee52a56b77e105a05fb9d7d8c32920f6e9d71bc88ca926f"></a>GARBLE_FIXED_WIRE_ZERO&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a7697bea1e9186be63eee52a56b77e105ad86498266f1fa48c33b463de42008b26"></a>GARBLE_FIXED_WIRE_ONE&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<a id="acde351ee0c4a231557cb9d0b8b7a2641"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acde351ee0c4a231557cb9d0b8b7a2641">&sect;&nbsp;</a></span>garble_gate_type_e</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="garble_8h.html#acde351ee0c4a231557cb9d0b8b7a2641">garble_gate_type_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641a52460d58d67a95fd6a4c3de2636d4336"></a>GARBLE_GATE_ZERO&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641a8fad1597166462317aea89d5ffd7bf26"></a>GARBLE_GATE_ONE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641aa6a6bdaab4cbde5d9524a39cac9f3bfa"></a>GARBLE_GATE_AND&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641aba755ac9df8a00aced8acf0c4954adff"></a>GARBLE_GATE_OR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641aae23d6b3616d3c94138784a6a5b939cc"></a>GARBLE_GATE_XOR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641aae9171a4c3e599ea8bf44d87f3ae1ce9"></a>GARBLE_GATE_NOT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="acde351ee0c4a231557cb9d0b8b7a2641a3a316e5e965d01bedddeb55c7f0735f6"></a>GARBLE_GATE_EMPTY&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<a id="af39b2d4a5065ed9a3eed74fc34ac2ad4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af39b2d4a5065ed9a3eed74fc34ac2ad4">&sect;&nbsp;</a></span>garble_type_e</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af39b2d4a5065ed9a3eed74fc34ac2ad4ad57708d715bb8bb9faa9b67829c30087"></a>GARBLE_TYPE_STANDARD&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af39b2d4a5065ed9a3eed74fc34ac2ad4a1750197c5101b52eeee2e90fc56e4355"></a>GARBLE_TYPE_HALFGATES&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="af39b2d4a5065ed9a3eed74fc34ac2ad4a43e9d57a6abf6baa2112c3189f0d2233"></a>GARBLE_TYPE_PRIVACY_FREE&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="af34b0a90e6270876e81746bcea49b1c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af34b0a90e6270876e81746bcea49b1c3">&sect;&nbsp;</a></span>garble_check()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_check </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char&#160;</td>
          <td class="paramname"><em>hash</em>[SHA_DIGEST_LENGTH]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a49e02f7f9707443a340667d6b31f3551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49e02f7f9707443a340667d6b31f3551">&sect;&nbsp;</a></span>garble_circuit_from_file()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_circuit_from_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>fname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae26c7329a5f399ac41789738554d120e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae26c7329a5f399ac41789738554d120e">&sect;&nbsp;</a></span>garble_circuit_to_file()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_circuit_to_file </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>fname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a897f0ca0e18a20f471a0f5e7a8337a9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a897f0ca0e18a20f471a0f5e7a8337a9f">&sect;&nbsp;</a></span>garble_create_delta()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> garble_create_delta </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a64fd0f10ec2840d1330c2e47224919a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64fd0f10ec2840d1330c2e47224919a8">&sect;&nbsp;</a></span>garble_create_input_labels()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void garble_create_input_labels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>privacyfree</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a6c1b1fd633c98c372c0e1b20c591734e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c1b1fd633c98c372c0e1b20c591734e">&sect;&nbsp;</a></span>garble_delete()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void garble_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7aa790863d24f73f7502ef7a7dc05be1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7aa790863d24f73f7502ef7a7dc05be1">&sect;&nbsp;</a></span>garble_eval()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_eval </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>input_labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>output_labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>outputs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa461a818a34411380a3e1028bd4203e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa461a818a34411380a3e1028bd4203e5">&sect;&nbsp;</a></span>garble_extract_labels()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void garble_extract_labels </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>extracted_labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool *&#160;</td>
          <td class="paramname"><em>bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4f1bd70b4528fef9e8ed516521bed8be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f1bd70b4528fef9e8ed516521bed8be">&sect;&nbsp;</a></span>garble_from_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_from_buffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wires</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7ec524e6b001e5aac0add6e919ed79f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ec524e6b001e5aac0add6e919ed79f3">&sect;&nbsp;</a></span>garble_garble()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_garble </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>input_labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>output_labels</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8ec77b23347e8f4a4711314af040e6a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ec77b23347e8f4a4711314af040e6a4">&sect;&nbsp;</a></span>garble_hash()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void garble_hash </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>hash</em>[SHA_DIGEST_LENGTH]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a93d0d290d611e7113a452663f46e80dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93d0d290d611e7113a452663f46e80dc">&sect;&nbsp;</a></span>garble_load()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_load </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wires</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a4b9f7f736a766cb8ad0e880feeef6d20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b9f7f736a766cb8ad0e880feeef6d20">&sect;&nbsp;</a></span>garble_map_outputs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_map_outputs </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>output_labels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="garble_2block_8h.html#a65abbf31b0a30290189cdb5059b5f785">block</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>vals</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>m</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a89d737f9363be1158045f0ed69c559e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89d737f9363be1158045f0ed69c559e6">&sect;&nbsp;</a></span>garble_new()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_new </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="garble_8h.html#af39b2d4a5065ed9a3eed74fc34ac2ad4">garble_type_e</a>&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a922d374cc71891c04534bca09b6e87cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a922d374cc71891c04534bca09b6e87cf">&sect;&nbsp;</a></span>garble_save()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_save </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wires</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a27c3063abd801e159764f1fac8e33a77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27c3063abd801e159764f1fac8e33a77">&sect;&nbsp;</a></span>garble_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t garble_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wires</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a20bfa75f4c119870870505e56a94570d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20bfa75f4c119870870505e56a94570d">&sect;&nbsp;</a></span>garble_table_size()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">size_t garble_table_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a1e352fd4b3bba37650eba0c84b38df15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e352fd4b3bba37650eba0c84b38df15">&sect;&nbsp;</a></span>garble_to_buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int garble_to_buffer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structgarble__circuit.html">garble_circuit</a> *&#160;</td>
          <td class="paramname"><em>gc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wires</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_eec959d81771dc8b1a750b834e1341eb.html">emp-tool</a></li><li class="navelem"><a class="el" href="dir_c655749829cb727292045fefce142869.html">garble</a></li><li class="navelem"><a class="el" href="garble_8h.html">garble.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
